<?php
echo $this->Html->css(
    array(
        'reset',
        'color-red',
        'style',
        'jquery.fancybox',
        'jquery.gridster.min',
        'magnific-popup',
        'admin.widget',
        'admin.bar',
        'colpick',
        'page'
    )
);

echo $this->Html->script(
    array(
        'jquery.min',
        'jquery.easytabs.min',
        'jquery.hashchange.min',
        'jquery.isotope.min',
        'jquery.adipoli.min',
        'jquery.fancybox.pack',
        'jquery.gmap.min',
        'jquery.gridster.min',
        'jquery.magnific-popup.min',
        'jquery.form.js',
        '/thirdparty/tinymce/tinymce.min.js',
        '/thirdparty/tinymce/jquery.tinymce.min.js',
        'response.min',
        'custom',
        'grid',
        'colpick',
        'notify'
    )
);

foreach (CakePlugin::loaded() as $plugin) {
    if (stripos($plugin, "Widget")) {
        echo $this->Html->script($plugin . '.script');
        echo $this->Html->css($plugin . '.style');
    }
}

if ($this->Session->read('user.is_admin')) {

    echo $this->Html->script(
        array(
            'admin.main',
            'admin.page',
            'admin.category',
            'admin.widget'
        )
    );
}
?>